package cn.com.guage.dtm.design.pattern.singleton;

enum EnumSingleton {
    INSTANCE;

    public void showMessage() {
        System.out.println("这是枚举单例消息");
    }
}

public class 单例模式_枚举单例模式 {
    public static void main(String[] args) {
        EnumSingleton singleton = EnumSingleton.INSTANCE;
        singleton.showMessage();
    }
}